﻿using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;

namespace Sustainalytics.Entities.RiskRatings
{
    [BsonIgnoreExtraElements]
    public class RiskRatingIndicatorBase : IHasCompanyId
    {
        public Guid Id { get; set; }
        public Guid CompanyId { get; set; }
        public int ExternalId { get; set; }

        public string Name { get; set; }
        public string Code { get; set; }
        public Timestamped<double> WeightedScore { get; set; }
        public Timestamped<double> DefaultWeight { get; set; }
        public Timestamped<double> FinalWeight { get; set; }
        public Timestamped<int> RawScore { get; set; }
        public Timestamped<int> AnswerCategory { get; set; }
        public Timestamped<string> AnswerCategoryText { get; set; }

        [BsonRepresentation(BsonType.String)]
        public IndicatorType IndicatorType { get; set; }

        public IEnumerable<CheckBox> CheckBoxes { get; set; }
        public Timestamped<string> Comment { get; set; }
        public IEnumerable<string> Sources { get; set; }
        public Timestamped<int> SortKey { get; set; }
    }
}
